<template>
  <div>
    <Hf/>
    <div id="nav">
      <div id="navzi">
        <div class="navbox">
          <ul>
            <li v-for="(v, i) in topData" :key="i" @click="fun(v.url)">
              <p><img :src="v.imgUrl" /></p>
              <p class="toptex">{{ v.title }}</p>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Hf from "../../homes/dome/headlf";
export default {
  components:{
  Hf
  },
  props: ["topData"],
  methods: {
    fun(url) {
      // 编程式方式进行----路由跳转
      this.$router.push(url);
    },
  },
};
</script>
<style lang="less" scoped>
h1 {
  width: 100%;
  height: 0.3rem;
  background-color: #0f68b7;
  width: 100%;
  font-size: 0.14rem;
  color: #fff;
  padding: 0 0.1rem;
  position: flex;
  top: 0;
}
#nav {
  width: 100%;
  display: flex;
  overflow: hidden;
  height: 2.07rem;
}
#navzi {
  width: 100%;
  height: 1.37rem;
  background-image: url(../../../../public/lifeimg/bj.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.navbox {
  width: 92%;
  height: 0.9rem;
  background-color: #fff;
  border-radius: 0.1rem;
  margin: auto;
  margin-top: 1rem;
  box-shadow: 1px 1px 5px #909090;
}
ul {
  display: flex;
  height: 100%;

  li {
    flex: 1;
    text-align: center;
    font-size: 0.14rem;
    align-items: center;
    margin-top: 0.1rem;

    p {
      span {
        font-size: 0.3rem;
      }
    }
  }
}
.toptex {
  margin-top: 0.0067rem;
}
img {
  width: 47%;
}
</style>